﻿using System.Linq;
using HP48CSharp.Interfaces;

namespace HP48CSharp.Entities
{
    internal class Filter : IFilter
    {
        #region IFilter Members

        public IToken Tokens
        {
            get;
            set;
        }

        /// <summary>
        /// Determines if the character is in the Tokens Collection
        /// </summary>
        /// <param name="c">char entered</param>
        public bool Contains(object c)
        {
            char charCast =(char) c;
            return Tokens.Collection.Contains(charCast );
        }

        #endregion
    }
}
